package de.voegel.controller.fileReader;

import java.io.File;
import java.io.FileNotFoundException;
import java.util.Scanner;

public class FileReader {

	private final String result;

	public String getResult() {
		return result;
	}

	public FileReader() throws FileNotFoundException {
		this.result = readFile();
	}

	@SuppressWarnings("resource")
	private String readFile() throws FileNotFoundException {
		Scanner sc;
		String result = "";

		File file = new File("D:\\", "ddl.txt");

		sc = new Scanner(file);
		while (sc.hasNextLine()) {
			String line = sc.nextLine();
			result += line.trim();
		}
		return result;
	}

}
